
<template>
  <div class="grade1 base-background-img">
    <ul class="ul-item-content">
      <li class="li-item-content" v-for='(item, index) in tabs' :key="index" :class="{'active': item.isSelected}" @click="swiper(item)">
        <img style="width:260px;height:51px;" :src="item.img" alt="">
      </li>
    </ul>
    <c-pdf @closePdf="closePdf" v-if="isshowpdf" :info="info" :infourl="pdfurl"></c-pdf>
  </div>
</template>

<script>
  import STATICPATH from '../../config.js'
  export default {
    name: 'grade5',
    data () {
      return {
        isshowpdf: false,
        ishsowvideo: false,
        info: '',
        infourl: '',
        tabs: [{
          img: 'static/robot/2x/1-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——椅子变变变.pdf',
          data: []
        },
        {
          img: 'static/robot/2x/2-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——我爱梳妆.pdf',
          data: []
        },
        {
          img: 'static/robot/2x/3-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——人行立交桥.pdf',
          data: []
        },
        {
          img: 'static/robot/2x/4-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——城市观光塔.pdf',
          data: []
        },
        {
          img: 'static/robot/2x/5-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——会发光的道闸.pdf',
          data: []
        },
        {
          img: 'static/robot/2x/6-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——警用装备.pdf',
          data: []
        },
        {
          img: 'static/robot/2x/7-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——X光机.pdf',
          data: []
        },
        {
          img: 'static/robot/2x/8-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——火警救援.pdf',
          data: []
        },
        {
          img: 'static/robot/2x/9-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——欢乐熊猫.pdf',
          data: []
        },
        {
          img: 'static/robot/2x/10-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——小飞龙.pdf',
          data: [{
            isSelected: 1,
            name: '画龙点睛',
            url: STATICPATH + '/robot/5/纸卡/画龙点睛.mp4'
          }]
        },
        {
          img: 'static/robot/2x/11-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——出发吧，旅行.pdf',
          data: [{
            isSelected: 1,
            name: '小动物们的旅行',
            url: STATICPATH + '/robot/5/大颗粒/小动物们的旅行.mp4'
          }]
        },
        {
          img: 'static/robot/2x/12-2.png',
          url: 'static/robot/pdf/5/【课程讲义】——纸杯环保秀.pdf',
          data: []
        }]
      }
    },
    methods: {
      swiper: function (item) {
        console.log(item)
        this.info = item.data
        this.pdfurl = item.url
        this.isshowpdf = true
      },
      closePdf: function () {
        this.isshowpdf = false
      }
    }
  }
</script>

<style scoped>
.grade1 > div {
  position: absolute; 
}
.ul-item-content {
  margin: 0;
  padding: 0;
  list-style-type: none;
  z-index: 10;
  top: 230px;
  left: 190px;
  width: 910px;
  height: 480px;
  position: absolute;
}
.li-item-content {
  cursor: pointer;
  float: left;
  margin: 15px 20px;
  position: initial;
}
</style>
